/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package daa.levelup.Window;

import javax.swing.*;
import java.awt.*;

/**
 *
 * @author user
 */
public class MUFrame extends JFrame

{
    public MUFrame() throws HeadlessException
    {
        setupFrame();
        fillFrame();
    }

    private void setupFrame()
    {
        setTitle("I'll find you!!");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        Toolkit t = Toolkit.getDefaultToolkit();
        Dimension d = t.getScreenSize();
        int coordX = d.width / 2;
        int coordY = d.height / 2;
        int windowWidth = 300;
        int windowHeight = 150;
        coordX = (int) (coordX - windowWidth *0.75);
        coordY = (int) (coordY - windowHeight *0.85);
        setBounds(coordX, coordY, windowWidth, windowHeight);
    }

    private void fillFrame()
    {
        FrameDesign p = new FrameDesign(new Logic());
        add(p);
    }
} 

